import { useState } from 'react';
import { WithCounter } from './WithCounter';

const InputCounter = (props: any) => {
  return (
    <div>
      {/* 原来使用的是自己定义的 */}
      {/* <button onClick={incrementCount}>按钮被点击了{count}次</button> */}
      <input onBlur={props.incrementCount}></input>
      <div> 失去焦点{props.count}次</div>
    </div>
  );
};

export default WithCounter(InputCounter);
